<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<div>{{pmsg}}</div>
			<menu-item title="来自父组件的值"></menu-item>
			<menu-item :title="ptitle" content="Hello"></menu-item>
		</div>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
	    <script type="text/javascript">
	    	Vue.component('menu-item',{
				props:['title','content'],
				data:function(){
					return {
						msg:'子组件本身的数据'
					}
				},
				template:'<div>{{msg + "-----" + title +"---- "+ content}}</div>'
			});
			
			var vm = new Vue({
				el:'#app',
				data:{
					pmsg:'父组件中的内容',
					ptitle:'动态绑定属性'
				}
			})
	    </script>
	</body>
</html>
